package com.thd.springboottest.async.service;

import java.util.concurrent.Future;

/**
 * com.thd.springboottest.async.service.AsyncService
 *
 * @author: wanglei62
 * @DATE: 2022/8/31 10:00
 **/
public interface AsyncService {

    // 同步执行的方法
    public void doTaskOne() throws Exception;
    public void doTaskTwo() throws Exception;
    public void doTaskThree() throws Exception;


    // 异步执行的方法
    public void doAsyncTaskOne() throws Exception;
    public void doAsyncTaskTwo() throws Exception;
    public void doAsyncTaskThree() throws Exception;

    // 异步带有返回值的方法
    public Future<String> doReturnAsyncTaskOne() throws Exception;
    public Future<String> doReturnAsyncTaskTwo() throws Exception;
    public Future<String> doReturnAsyncTaskThree() throws Exception;
}
